<?php

// 获取个人信息
// GET member.info.get

namespace app\api\resource\member\info;
use think\Db;
use think\Session;

class Get
{
    // 方法
    public $_method = ['GET'];
    // 前置
    public $_pre    = ['login'];
    // 描述
    public $_description = '获取个人信息';
    // 参数
    public $_param  = [
    ];
    // 返回
    public $_return = [
        200 => '获取成功',
    ];

    public function run(&$request)
    {
        $memberId = Session::get('member.id');

        $ret = Db::name('member_info')->where('member_id',$memberId)->find();
        
        return [200,$ret];
    }
}